/* src/containers/InterviewRoom/style.css - 修复后的面试房间样式 */

.room-interview-room {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* 顶部状态栏 */
.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.room-interview-status {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.room-phase-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.room-phase-text {
  color: inherit;
}

.room-round-indicator {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.room-timer-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 68, 68, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  animation: room-pulse 2s infinite;
}

@keyframes room-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.room-time {
  color: white;
}

.room-controls {
  display: flex;
  gap: 0.5rem;
}

.room-control-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 1 !important;
  visibility: visible !important;
}

.room-control-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.05);
}

.room-exit-btn:hover {
  background: rgba(255, 68, 68, 0.3) !important;
}

/* 错误提示 */
.room-alert {
  margin: 0.5rem 2rem;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-alert-error {
  background: rgba(255, 68, 68, 0.2);
  border: 1px solid rgba(255, 68, 68, 0.3);
}

/* 主内容区 */
.room-main-content {
  flex: 1;
  display: flex;
  padding: 2rem;
  gap: 2rem;
}

/* AI面试官区域 */
.room-ai-section {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.room-ai-avatar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.room-avatar {
  position: relative;
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.room-speaking-animation {
  position: absolute;
  bottom: -5px;
  right: -5px;
  display: flex;
  gap: 2px;
}

.room-wave {
  width: 3px;
  height: 10px;
  background: #4CAF50;
  animation: room-wave 0.5s infinite alternate;
}

.room-wave:nth-child(2) { animation-delay: 0.1s; }
.room-wave:nth-child(3) { animation-delay: 0.2s; }

@keyframes room-wave {
  from { height: 5px; }
  to { height: 15px; }
}

.room-ai-info h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.room-ai-info p {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* 问题区域 */
.room-question-area {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  flex: 1;
}

.room-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.room-question-header h4 {
  margin: 0;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.room-skip-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2) !important;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  color: white !important;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  opacity: 1 !important;
  visibility: visible !important;
}

.room-skip-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
}

.room-question-content {
  margin-bottom: 1.5rem;
}

.room-question-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
  color: white;
}

.room-placeholder {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  margin: 0;
}

.room-status-message {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  text-align: center;
}

.room-status-message p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

/* 用户视频区域 */
.room-user-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.room-user-video-container {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  min-height: 300px; /* 确保最小高度 */
}

.room-user-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  border-radius: 16px;
}

.room-user-video.room-camera-off {
  opacity: 0.3;
}

/* 调试信息样式 */
.room-debug-info {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px;
  border-radius: 5px;
  font-size: 10px;
  z-index: 10;
}

.room-debug-info small {
  display: block;
  margin: 2px 0;
}

.room-camera-off-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  gap: 1rem;
  z-index: 5;
}

.room-retry-camera-btn {
  margin-top: 10px;
  padding: 5px 10px;
  background: #4CAF50 !important;
  color: white !important;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  opacity: 1 !important;
  visibility: visible !important;
}

.room-retry-camera-btn:hover {
  background: #45a049 !important;
}

.room-user-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.room-recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 68, 68, 0.2);
  padding: 1rem;
  border-radius: 8px;
  justify-content: center;
  flex-direction: column;
}

.room-recording-status {
  text-align: center;
}

.room-recognition-status {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.8);
}

.room-recognized-text {
  margin-top: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-family: monospace;
  color: #4CAF50;
  max-width: 100%;
  word-break: break-all;
}

.room-recording-icon {
  width: 12px;
  height: 12px;
  background: #ff4444;
  border-radius: 50%;
  animation: room-pulse 1s infinite;
}

/* 底部控制栏 */
.room-bottom-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 媒体控制 */
.room-media-controls {
  display: flex;
  gap: 1rem;
}

.room-media-controls .room-control-btn {
  width: 50px;
  height: 50px;
  font-size: 1.1rem;
}

.room-media-controls .room-control-btn.room-disabled {
  background: rgba(255, 68, 68, 0.3) !important;
}

/* 面试控制 */
.room-interview-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.room-start-interview-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(45deg, #4CAF50, #45a049) !important;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  color: white !important;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  opacity: 1 !important;
  visibility: visible !important;
}

.room-start-interview-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.room-completion-message {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: #4CAF50;
}

/* 进度条 */
.room-progress-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.room-progress-bar {
  width: 200px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.room-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #45a049);
  transition: width 0.3s ease;
}

.room-progress-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

/* 错误页面 */
.room-interview-room.room-error {
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-error-container {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 3rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  max-width: 500px;
}

.room-error-container h2 {
  color: #ff4444;
  margin-bottom: 1rem;
}

.room-back-btn {
  background: #4CAF50 !important;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  color: white !important;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 1rem;
  transition: all 0.3s ease;
  opacity: 1 !important;
  visibility: visible !important;
}

.room-back-btn:hover {
  background: #45a049 !important;
  transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .room-main-content {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .room-header {
    padding: 0.5rem 1rem;
  }
  
  .room-interview-status {
    gap: 1rem;
  }
  
  .room-bottom-controls {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .room-progress-section {
    width: 100%;
    justify-content: center;
  }
  
  .room-progress-bar {
    flex: 1;
    max-width: 300px;
  }
}